/*
 * Copyright 2015-2016 Imply Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

%button-base {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  min-width: 60px;
  text-align: center;
  cursor: pointer;
  border-radius: 2px;
  outline: none;
  height: $input-height;

  //transition-property: all;
  //transition-duration: $duration;

  &.active,
  &:active {
    //transition-duration: 0s;
  }

  &.disabled,
  &[disabled] {
    opacity: .60;
    cursor: default;
    pointer-events: none;
  }
}

%button-primary {
  @extend %button-base;
  background: $brand;
  color: $white;

  svg path {
    fill: $white;
  }

  &:hover {
    background: darken($brand, 5%);
  }

  &.active,
  &:active {
    background: darken($brand, 10%);
    color: darken($white, 12%);

    svg path {
      fill: darken($white, 12%);
    }
  }
}

%button-secondary {
  @extend %button-base;
  background: rgba($brand, 0.22);
  color: $brand;

  svg path {
    fill: $brand;
  }

  &:hover {
    background: rgba($brand, 0.3);
  }

  &.active,
  &:active {
    background: rgba($brand, 0.38);
  }
}

%button-warn {
  @extend %button-base;
  background: $error;
  color: $white;

  svg path {
    fill: $white;
  }

  &:hover {
    background: darken($error, 5%);
  }

  &.active,
  &:active {
    background: darken($error, 10%);
    color: darken($white, 12%);

    svg path {
      fill: darken($white, 12%);
    }
  }
}

%button-light {
  color: $text-standard;
  background-color: transparent;
  cursor: pointer;

  &:hover {
    background-color: $hover;
  }

  &.active {
    background-color: $highlight;
  }
}

%button-light-action {
  @extend %button-light;
  font-size: 12px;
  text-transform: uppercase;
  color: $brand;
  padding: 6px;
  border-radius: 2px;

  &:not(:last-child) {
    margin-right: 15px;
  }
}
